package com.chuangjiangx.member.stored.web.response;


import com.chuangjiangx.member.stored.service.model.RechargeOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

/**
 * @author cj-ch
 * @date 2018/7/5 下午6:40
 */
@ApiModel
@Getter
public class RequestRechargeResponse {
    /**
     * 1 - 表示充值下单结果(ordersResult有值)
     * 2 - 表示需要重定向(order 有值)
     * 默认为1
     */
    @ApiModelProperty(value = "状态",notes = "1 - 充值下单成功 2- 需要重定向",allowableValues = "1,2",dataType = "Integer",required = true)
    private Integer state = 1;
    @ApiModelProperty(value = "充值下单结果")
    private RechargeOrder order;
    @ApiModelProperty(value = "重定向链接",example = "http://member.merchant.chuangjiangx.com/xxx/xxx/xx")
    private String redirectUrl;


    public void setOrder(RechargeOrder order) {
        this.order = order;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.state = 2;
        this.redirectUrl = redirectUrl;
    }
}
